<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<title>Tests</title>
<link href="../docs-assets/Breadcrumbs.css" rel="stylesheet" rev="stylesheet" type="text/css">
		<meta name="viewport" content="width=device-width initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta http-equiv="Content-Language" content="en-gb">

<link href="../docs-assets/Contents.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Progress.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Navigation.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Fonts.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Base.css" rel="stylesheet" rev="stylesheet" type="text/css">
<link href="../docs-assets/Colours.css" rel="stylesheet" rev="stylesheet" type="text/css">
		
	</head>
	<body class="commentary-font">
		<nav role="navigation">
		<h1><a href="../index.html"><img src="../docs-assets/Inform.png" height=72> </a></h1>
<ul><li><a href="../index.html">home</a></li>
</ul><h2>Compiler</h2><ul>
<li><a href="../structure.html">structure</a></li>
<li><a href="../inbuildn.html">inbuild</a></li>
<li><a href="../inform7n.html">inform7</a></li>
<li><a href="../intern.html">inter</a></li>
<li><a href="../services.html">services</a></li>
<li><a href="../secrets.html">secrets</a></li>
</ul><h2>Other Tools</h2><ul>
<li><a href="../inblorbn.html">inblorb</a></li>
<li><a href="../inform6.html">inform6</a></li>
<li><a href="../inpolicyn.html">inpolicy</a></li>
</ul><h2>Resources</h2><ul>
<li><a href="../extensions.html">extensions</a></li>
<li><a href="../kits.html">kits</a></li>
</ul><h2>Repository</h2><ul>
<li><a href="https://github.com/ganelson/inform"><img src="../docs-assets/github.png" height=0> github</a></li>
</ul><h2>Related Projects</h2><ul>
<li><a href="https://github.com/ganelson/inweb"><img src="../docs-assets/github.png" height=0> inweb</a></li>
<li><a href="https://github.com/ganelson/intest"><img src="../docs-assets/github.png" height=0> intest</a></li>
</ul>
		</nav>
		<main role="main">
		<!-- Weave of 'Tests' generated by inweb -->
<div class="breadcrumbs">
    <ul class="crumbs"><li><a href="../index.html">Home</a></li><li><a href="../extensions.html">Kits</a></li><li><a href="index.html">WorldModelKit</a></li><li><b>Tests</b></li></ul></div>
<p class="purpose">Tests  The command grammar and I6 implementation for testing commands such as TEST, ACTIONS and PURLOIN.</p>

<ul class="toc"><li><a href="tsts.html#SP1">&#167;1. All testy</a></li><li><a href="tsts.html#SP2">&#167;2. Abstract Command</a></li><li><a href="tsts.html#SP3">&#167;3. Actions Command</a></li><li><a href="tsts.html#SP4">&#167;4. Banish Command</a></li><li><a href="tsts.html#SP5">&#167;5. Gonear Command</a></li><li><a href="tsts.html#SP6">&#167;6. Purloin Command</a></li><li><a href="tsts.html#SP7">&#167;7. Random Command</a></li><li><a href="tsts.html#SP8">&#167;8. Relations Command</a></li><li><a href="tsts.html#SP9">&#167;9. Responses Command</a></li><li><a href="tsts.html#SP10">&#167;10. Rules Command</a></li><li><a href="tsts.html#SP11">&#167;11. Dialogue Command</a></li><li><a href="tsts.html#SP12">&#167;12. Scenes Command</a></li><li><a href="tsts.html#SP13">&#167;13. Scope Command</a></li><li><a href="tsts.html#SP14">&#167;14. Showheap Command</a></li><li><a href="tsts.html#SP15">&#167;15. ShowMe Command</a></li><li><a href="tsts.html#SP16">&#167;16. Showverb Command</a></li><li><a href="tsts.html#SP17">&#167;17. Test Command</a></li><li><a href="tsts.html#SP18">&#167;18. Trace Command</a></li><li><a href="tsts.html#SP19">&#167;19. Tree Command</a></li><li><a href="tsts.html#SP20">&#167;20. GlkList Command</a></li><li><a href="tsts.html#SP21">&#167;21. Grammar</a></li><li><a href="tsts.html#SP22">&#167;22. End testy</a></li></ul><hr class="tocbar">

<p class="commentary firstcommentary"><a id="SP1" class="paragraph-anchor"></a><b>&#167;1. All testy.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">#</span><span class="identifier-syntax">Ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">DEBUG</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP2" class="paragraph-anchor"></a><b>&#167;2. Abstract Command.</b>The code below is compiled only if the symbol <span class="extract"><span class="extract-syntax">DEBUG</span></span> is defined, which it
always is for normal runs in the Inform user interface, but not for Release
runs.
</p>

<p class="commentary">Not all of these commands are documented; this is intentional. They may be
changed in name or function. This is all of the testing commands except for
the GLKLIST command, which is in Glulx.i6t (and does not exist when the
target VM is the Z-machine).
</p>

<p class="commentary">We take the commands in alphabetical order, beginning with ABSTRACT, which
moves an object to a new position in the object tree.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">XAbstractSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">XTestMove</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">, </span><span class="identifier-syntax">second</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">noun</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">worn</span><span class="plain-syntax">) </span><span class="reserved-syntax">give</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> ~</span><span class="identifier-syntax">worn</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">move</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> </span><span class="reserved-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">second</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="string-syntax">"[Abstracted.]"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">XTestMove</span><span class="plain-syntax"> </span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="identifier-syntax">dest</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">) </span><span class="reserved-syntax">print_ret</span><span class="plain-syntax"> </span><span class="string-syntax">"[Can't move "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="string-syntax">": it's part of "</span><span class="plain-syntax">,</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">the</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">, </span><span class="string-syntax">".]"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dest</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">dest</span><span class="plain-syntax"> == </span><span class="identifier-syntax">obj</span><span class="plain-syntax">) </span><span class="reserved-syntax">print_ret</span><span class="plain-syntax"> </span><span class="string-syntax">"[Can't move "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="string-syntax">": it would contain itself.]"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">dest</span><span class="plain-syntax"> = </span><span class="identifier-syntax">CoreOfParentOfCoreOf</span><span class="plain-syntax">(</span><span class="identifier-syntax">dest</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP3" class="paragraph-anchor"></a><b>&#167;3. Actions Command.</b>ACTIONS turns tracing of actions on.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ActionsOnSub</span><span class="plain-syntax">; </span><span class="identifier-syntax">trace_actions</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="string-syntax">"Actions listing on."</span><span class="plain-syntax">; ];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">ActionsOffSub</span><span class="plain-syntax">; </span><span class="identifier-syntax">trace_actions</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="string-syntax">"Actions listing off."</span><span class="plain-syntax">; ];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP4" class="paragraph-anchor"></a><b>&#167;4. Banish Command.</b>Like ABSTRACT, except that it removes something from play.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">XBanishSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">XTestMove</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">, </span><span class="reserved-syntax">nothing</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">give</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> ~</span><span class="identifier-syntax">worn</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">remove</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="string-syntax">"[Banished.]"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP5" class="paragraph-anchor"></a><b>&#167;5. Gonear Command.</b>GONEAR teleports the player to the vicinity of some named item.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">GonearSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">PlayerTo</span><span class="plain-syntax">(</span><span class="identifier-syntax">LocationOf</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">));</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP6" class="paragraph-anchor"></a><b>&#167;6. Purloin Command.</b>To PURLOIN is to acquire something without reference to any rules on accessibility.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">XPurloinSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">XTestMove</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">, </span><span class="identifier-syntax">player</span><span class="plain-syntax">)) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">move</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> </span><span class="reserved-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">player</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">give</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> </span><span class="identifier-syntax">moved</span><span class="plain-syntax">; </span><span class="reserved-syntax">give</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> ~</span><span class="identifier-syntax">concealed</span><span class="plain-syntax">; </span><span class="reserved-syntax">give</span><span class="plain-syntax"> </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> ~</span><span class="identifier-syntax">worn</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"[Purloined.]"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP7" class="paragraph-anchor"></a><b>&#167;7. Random Command.</b>RANDOM forces the random-number generator to a predictable seed value.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">PredictableSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">VM_Seed_RNG</span><span class="plain-syntax">(-100);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"[Random number generator now predictable.]"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP8" class="paragraph-anchor"></a><b>&#167;8. Relations Command.</b>RELATIONS lists the current state of the mutable relations.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowRelationsSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">   </span><span class="identifier-syntax">IterateRelations</span><span class="plain-syntax">(</span><span class="identifier-syntax">ShowOneRelation</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowOneRelation</span><span class="plain-syntax"> </span><span class="identifier-syntax">rel</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">RlnGetF</span><span class="plain-syntax">(</span><span class="identifier-syntax">rel</span><span class="plain-syntax">, </span><span class="identifier-syntax">RR_PERMISSIONS</span><span class="plain-syntax">)) &amp; (</span><span class="identifier-syntax">RELS_SHOW</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        (</span><span class="identifier-syntax">RlnGetF</span><span class="plain-syntax">(</span><span class="identifier-syntax">rel</span><span class="plain-syntax">, </span><span class="identifier-syntax">RR_HANDLER</span><span class="plain-syntax">))(</span><span class="identifier-syntax">rel</span><span class="plain-syntax">, </span><span class="identifier-syntax">RELS_SHOW</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP9" class="paragraph-anchor"></a><b>&#167;9. Responses Command.</b>RESPONSES lists the known responses.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowResponsesSub</span><span class="plain-syntax"> </span><span class="identifier-syntax">a</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> </span><span class="identifier-syntax">j</span><span class="plain-syntax"> </span><span class="identifier-syntax">reg</span><span class="plain-syntax"> </span><span class="identifier-syntax">wd</span><span class="plain-syntax"> </span><span class="identifier-syntax">set_mode</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">NO_RESPONSES</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="string-syntax">"There are no lettered responses."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wn</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">NextWordStopped</span><span class="plain-syntax">() == </span><span class="character-syntax">'now'</span><span class="plain-syntax">) </span><span class="identifier-syntax">set_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">wn</span><span class="plain-syntax">--;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">NextWordStopped</span><span class="plain-syntax">() == </span><span class="character-syntax">'set'</span><span class="plain-syntax">) </span><span class="identifier-syntax">set_mode</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">; </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">wn</span><span class="plain-syntax">--;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wd</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NextWordStopped</span><span class="plain-syntax">(); </span><span class="identifier-syntax">wn</span><span class="plain-syntax">--;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">wd</span><span class="plain-syntax"> == </span><span class="character-syntax">'all'</span><span class="plain-syntax">) </span><span class="identifier-syntax">reg</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">reg</span><span class="plain-syntax"> = -1;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">wd</span><span class="plain-syntax"> ~= -1) </span><span class="identifier-syntax">reg</span><span class="plain-syntax"> = </span><span class="identifier-syntax">TryNumber</span><span class="plain-syntax">(</span><span class="identifier-syntax">wn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">reg</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"&gt;--&gt; The following sets of responses are available:^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"    RESPONSES ALL^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">a</span><span class="plain-syntax">=0, </span><span class="identifier-syntax">i</span><span class="plain-syntax">=1, </span><span class="identifier-syntax">j</span><span class="plain-syntax">=0: </span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax">: </span><span class="identifier-syntax">a</span><span class="plain-syntax">=</span><span class="identifier-syntax">a</span><span class="plain-syntax">+3, </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">EMPTY_TEXT_PACKED</span><span class="plain-syntax">) </span><span class="identifier-syntax">j</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">reg</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">reg</span><span class="plain-syntax"> == </span><span class="identifier-syntax">j</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">EMPTY_TEXT_PACKED</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">set_mode</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"["</span><span class="plain-syntax">, (</span><span class="reserved-syntax">string</span><span class="plain-syntax">) </span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax">, </span><span class="string-syntax">"]^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">                    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="reserved-syntax">string</span><span class="plain-syntax">) </span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax">, </span><span class="string-syntax">":^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">ShowResponsesRange</span><span class="plain-syntax">(</span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">a</span><span class="plain-syntax">+1), </span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">a</span><span class="plain-syntax">+2), </span><span class="identifier-syntax">set_mode</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">reg</span><span class="plain-syntax"> &lt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">EMPTY_TEXT_PACKED</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"    RESPONSES "</span><span class="plain-syntax">, </span><span class="identifier-syntax">j</span><span class="plain-syntax">, </span><span class="string-syntax">": "</span><span class="plain-syntax">, (</span><span class="reserved-syntax">string</span><span class="plain-syntax">) </span><span class="identifier-syntax">ResponseDivisions</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">a</span><span class="plain-syntax">, </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowResponsesRange</span><span class="plain-syntax"> </span><span class="identifier-syntax">from</span><span class="plain-syntax"> </span><span class="reserved-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">set_mode</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax">=</span><span class="identifier-syntax">from</span><span class="plain-syntax">: </span><span class="identifier-syntax">i</span><span class="plain-syntax">&lt;=</span><span class="reserved-syntax">to</span><span class="plain-syntax">: </span><span class="identifier-syntax">i</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">set_mode</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="constant-syntax">1</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"now "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="constant-syntax">2</span><span class="plain-syntax">: ;</span>
<span class="plain-syntax">            </span><span class="constant-syntax">0</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"    "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">PrintResponse</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">set_mode</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="constant-syntax">1</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" is "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="constant-syntax">2</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" is "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="constant-syntax">0</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">": "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">suppress_text_substitution</span><span class="plain-syntax"> = </span><span class="reserved-syntax">true</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">CarryOutActivity</span><span class="plain-syntax">(</span><span class="identifier-syntax">PRINTING_RESPONSE_ACT</span><span class="plain-syntax">, </span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">suppress_text_substitution</span><span class="plain-syntax"> = </span><span class="reserved-syntax">false</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">set_mode</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="constant-syntax">1</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">";"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="constant-syntax">2</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP10" class="paragraph-anchor"></a><b>&#167;10. Rules Command.</b>RULES changes the level of rule tracing.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">RulesOnSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_rules</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"Rules tracing now switched on. Type ~rules off~ to switch it off again,</span>
<span class="string-syntax">     or ~rules all~ to include even rules which do not apply."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">RulesAllSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_rules</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"Rules tracing now switched to ~all~. Type ~rules off~ to switch it off again."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">RulesOffSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_rules</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"Rules tracing now switched off. Type ~rules~ to switch it on again."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP11" class="paragraph-anchor"></a><b>&#167;11. Dialogue Command.</b>DIALOGUE changes the level of dialogue tracing.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">DialogueOnSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_dialogue</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"(Dialogue tracing now switched on. Type ~dialogue off~ to switch it off again,</span>
<span class="string-syntax">     or ~dialogue all~ to include even dialogue which does not apply.)"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">DialogueAllSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_dialogue</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"(Dialogue tracing now switched to ~all~. Type ~dialogue off~ to switch it off again.)"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">DialogueOffSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_dialogue</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"(Dialogue tracing now switched off. Type ~dialogue~ to switch it on again.)"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP12" class="paragraph-anchor"></a><b>&#167;12. Scenes Command.</b>SCENES switches scene-change tracing on or off, and also shows the current position.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ScenesOnSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_scenes</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ShowSceneStatus</span><span class="plain-syntax">(); </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"(Scene monitoring now switched on. Type ~scenes off~ to switch it off again.)"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">ScenesOffSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">debug_scenes</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="string-syntax">"(Scene monitoring now switched off. Type ~scenes~ to switch it on again.)"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP13" class="paragraph-anchor"></a><b>&#167;13. Scope Command.</b>SCOPE prints a numbered list of all objects in scope to the player.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">x_scope_count</span><span class="plain-syntax">;</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">ScopeSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">x_scope_count</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">LoopOverScope</span><span class="plain-syntax">(</span><span class="identifier-syntax">Print_ScL</span><span class="plain-syntax">, </span><span class="identifier-syntax">noun</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">x_scope_count</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="string-syntax">"Nothing is in scope."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">Print_ScL</span><span class="plain-syntax"> </span><span class="identifier-syntax">obj</span><span class="plain-syntax">; </span><span class="reserved-syntax">print_ret</span><span class="plain-syntax"> ++</span><span class="identifier-syntax">x_scope_count</span><span class="plain-syntax">, </span><span class="string-syntax">": "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">a</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="string-syntax">" ("</span><span class="plain-syntax">, </span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="string-syntax">")"</span><span class="plain-syntax">; ];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP14" class="paragraph-anchor"></a><b>&#167;14. Showheap Command.</b>SHOWHEAP is for debugging the memory heap, and is intended for Inform
maintainers rather than users.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowHeapSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">HeapDebug</span><span class="plain-syntax">();</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP15" class="paragraph-anchor"></a><b>&#167;15. ShowMe Command.</b>SHOWME is probably the most useful testing command: it shows the state of the
current room, or a named item.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowMeSub</span><span class="plain-syntax"> </span><span class="identifier-syntax">t_0</span><span class="plain-syntax"> </span><span class="identifier-syntax">na</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">t_0</span><span class="plain-syntax"> = </span><span class="identifier-syntax">noun</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">noun</span><span class="plain-syntax"> == </span><span class="reserved-syntax">nothing</span><span class="plain-syntax">) </span><span class="identifier-syntax">noun</span><span class="plain-syntax"> = </span><span class="identifier-syntax">real_location</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ShowMeRecursively</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">, </span><span class="constant-syntax">0</span><span class="plain-syntax">, (</span><span class="identifier-syntax">noun</span><span class="plain-syntax"> == </span><span class="identifier-syntax">real_location</span><span class="plain-syntax">))) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">noun</span><span class="plain-syntax"> == </span><span class="identifier-syntax">real_location</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"* denotes things which are not in scope^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">t_0</span><span class="plain-syntax"> </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">K2_thing</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"location:"</span><span class="plain-syntax">; </span><span class="identifier-syntax">ShowRLocation</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">, </span><span class="reserved-syntax">true</span><span class="plain-syntax">); </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">t_0</span><span class="plain-syntax"> </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">K9_region</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">t_0</span><span class="plain-syntax">)) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"sub-region of: "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">the</span><span class="plain-syntax">) </span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">t_0</span><span class="plain-syntax">), </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">na</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ShowMeKindDetails</span><span class="plain-syntax">(</span><span class="reserved-syntax">false</span><span class="plain-syntax">, </span><span class="identifier-syntax">na</span><span class="plain-syntax">, </span><span class="identifier-syntax">t_0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">na</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ShowMeInstanceDetails</span><span class="plain-syntax">(</span><span class="reserved-syntax">false</span><span class="plain-syntax">, </span><span class="identifier-syntax">na</span><span class="plain-syntax">, </span><span class="identifier-syntax">t_0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">na</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ShowMeKindDetails</span><span class="plain-syntax">(</span><span class="reserved-syntax">true</span><span class="plain-syntax">, </span><span class="identifier-syntax">na</span><span class="plain-syntax">, </span><span class="identifier-syntax">t_0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">na</span><span class="plain-syntax"> = </span><span class="identifier-syntax">ShowMeInstanceDetails</span><span class="plain-syntax">(</span><span class="reserved-syntax">true</span><span class="plain-syntax">, </span><span class="identifier-syntax">na</span><span class="plain-syntax">, </span><span class="identifier-syntax">t_0</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowRLocation</span><span class="plain-syntax"> </span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="identifier-syntax">top</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">K1_room</span><span class="plain-syntax">) </span><span class="reserved-syntax">return</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">worn</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"worn by "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">animate</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"carried by "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">container</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"in "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">K1_room</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"in "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">supporter</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"on "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">the</span><span class="plain-syntax">) </span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">ShowRLocation</span><span class="plain-syntax">(</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">));</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">top</span><span class="plain-syntax"> == </span><span class="reserved-syntax">false</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">", which is "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"part of "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">the</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">ShowRLocation</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"out of play"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowMeRecursively</span><span class="plain-syntax"> </span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="identifier-syntax">depth</span><span class="plain-syntax"> </span><span class="identifier-syntax">f</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> </span><span class="identifier-syntax">k</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">spaces</span><span class="plain-syntax">(2*</span><span class="identifier-syntax">depth</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">f</span><span class="plain-syntax"> &amp;&amp; (</span><span class="identifier-syntax">depth</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">TestScope</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="identifier-syntax">player</span><span class="plain-syntax">) == </span><span class="reserved-syntax">false</span><span class="plain-syntax">)) { </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"*"</span><span class="plain-syntax">; </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="reserved-syntax">true</span><span class="plain-syntax">; }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">depth</span><span class="plain-syntax"> &gt; </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" (part of "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_parent</span><span class="plain-syntax">, </span><span class="string-syntax">")"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">worn</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" (worn)"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">provides</span><span class="plain-syntax"> </span><span class="identifier-syntax">KD_Count</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">k</span><span class="plain-syntax"> = </span><span class="identifier-syntax">KindHierarchy</span><span class="plain-syntax">--&gt;((</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">KD_Count</span><span class="plain-syntax">)*2);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">k</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">K2_thing</span><span class="plain-syntax">) || (</span><span class="identifier-syntax">depth</span><span class="plain-syntax">==0)) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" - "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">k</span><span class="plain-syntax"> == </span><span class="identifier-syntax">K4_door</span><span class="plain-syntax"> </span><span class="reserved-syntax">or</span><span class="plain-syntax"> </span><span class="identifier-syntax">K5_container</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">transparent</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"transparent "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">locked</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"locked "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">has</span><span class="plain-syntax"> </span><span class="identifier-syntax">open</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"open "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"closed "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            }</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">I7_Kind_Name</span><span class="plain-syntax">) </span><span class="identifier-syntax">k</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_child</span><span class="plain-syntax">) </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">c</span><span class="plain-syntax"> | </span><span class="identifier-syntax">ShowMeRecursively</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_child</span><span class="plain-syntax">, </span><span class="identifier-syntax">depth</span><span class="plain-syntax">+2, </span><span class="identifier-syntax">f</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">child</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">)) </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">c</span><span class="plain-syntax"> | </span><span class="identifier-syntax">ShowMeRecursively</span><span class="plain-syntax">(</span><span class="reserved-syntax">child</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">), </span><span class="identifier-syntax">depth</span><span class="plain-syntax">+2, </span><span class="identifier-syntax">f</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">depth</span><span class="plain-syntax">&gt;0) &amp;&amp; (</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_sibling</span><span class="plain-syntax">))</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">c</span><span class="plain-syntax"> | </span><span class="identifier-syntax">ShowMeRecursively</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">.</span><span class="identifier-syntax">component_sibling</span><span class="plain-syntax">, </span><span class="identifier-syntax">depth</span><span class="plain-syntax">, </span><span class="identifier-syntax">f</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">depth</span><span class="plain-syntax">&gt;0) &amp;&amp; (</span><span class="reserved-syntax">sibling</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">))) </span><span class="identifier-syntax">c</span><span class="plain-syntax"> = </span><span class="identifier-syntax">c</span><span class="plain-syntax"> | </span><span class="identifier-syntax">ShowMeRecursively</span><span class="plain-syntax">(</span><span class="reserved-syntax">sibling</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">), </span><span class="identifier-syntax">depth</span><span class="plain-syntax">, </span><span class="identifier-syntax">f</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">return</span><span class="plain-syntax"> </span><span class="identifier-syntax">c</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">AllowInShowme</span><span class="plain-syntax"> </span><span class="identifier-syntax">pr</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">pr</span><span class="plain-syntax"> == </span><span class="identifier-syntax">workflag</span><span class="plain-syntax"> </span><span class="reserved-syntax">or</span><span class="plain-syntax"> </span><span class="identifier-syntax">concealed</span><span class="plain-syntax"> </span><span class="reserved-syntax">or</span><span class="plain-syntax"> </span><span class="identifier-syntax">mentioned</span><span class="plain-syntax">) </span><span class="reserved-syntax">rfalse</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP16" class="paragraph-anchor"></a><b>&#167;16. Showverb Command.</b>SHOWVERB is a holdover from old I6 days, but still quite useful. It writes
out the I6 command verb grammar for the supplied command.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">ShowVerbSub</span><span class="plain-syntax"> </span><span class="identifier-syntax">address</span><span class="plain-syntax"> </span><span class="identifier-syntax">lines</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> </span><span class="identifier-syntax">x</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">wn</span><span class="plain-syntax"> = </span><span class="constant-syntax">2</span><span class="plain-syntax">; </span><span class="identifier-syntax">x</span><span class="plain-syntax"> = </span><span class="identifier-syntax">NextWordStopped</span><span class="plain-syntax">();</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordMarkedAsVerb</span><span class="plain-syntax">(</span><span class="identifier-syntax">x</span><span class="plain-syntax">) == </span><span class="reserved-syntax">false</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="string-syntax">"Try typing ~showverb~ and then the name of a verb."</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">DictionaryWordToVerbNum</span><span class="plain-syntax">(</span><span class="identifier-syntax">x</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">address</span><span class="plain-syntax"> = </span><span class="identifier-syntax">VM_CommandTableAddress</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">lines</span><span class="plain-syntax"> = </span><span class="identifier-syntax">address</span><span class="plain-syntax">-&gt;0;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">address</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"Verb "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">WordMarkedAsMeta</span><span class="plain-syntax">(</span><span class="identifier-syntax">x</span><span class="plain-syntax">)) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"meta "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">VM_PrintCommandWords</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">new_line</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">lines</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"has no grammar lines.^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (: </span><span class="identifier-syntax">lines</span><span class="plain-syntax">&gt;0 : </span><span class="identifier-syntax">lines</span><span class="plain-syntax">--) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">address</span><span class="plain-syntax"> = </span><span class="identifier-syntax">UnpackGrammarLine</span><span class="plain-syntax">(</span><span class="identifier-syntax">address</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"    "</span><span class="plain-syntax">; </span><span class="identifier-syntax">DebugGrammarLine</span><span class="plain-syntax">(); </span><span class="reserved-syntax">new_line</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">ParaContent</span><span class="plain-syntax">();</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">DebugGrammarLine</span><span class="plain-syntax"> </span><span class="identifier-syntax">pcount</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" * "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">for</span><span class="plain-syntax"> (: </span><span class="identifier-syntax">line_token</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">pcount</span><span class="plain-syntax"> ~= </span><span class="identifier-syntax">ENDIT_TOKEN</span><span class="plain-syntax"> : </span><span class="identifier-syntax">pcount</span><span class="plain-syntax">++) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">line_token</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">pcount</span><span class="plain-syntax">)-&gt;0 &amp; </span><span class="constant-syntax">$10</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"/ "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">DebugToken</span><span class="plain-syntax">) </span><span class="identifier-syntax">line_token</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">pcount</span><span class="plain-syntax">, </span><span class="string-syntax">" "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"-&gt; "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">DebugAction</span><span class="plain-syntax">) </span><span class="identifier-syntax">action_to_be</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">action_reversed</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" reverse"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">DebugToken</span><span class="plain-syntax"> </span><span class="identifier-syntax">token</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">AnalyseToken</span><span class="plain-syntax">(</span><span class="identifier-syntax">token</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">found_ttype</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">ILLEGAL_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"&lt;illegal token number "</span><span class="plain-syntax">, </span><span class="identifier-syntax">token</span><span class="plain-syntax">, </span><span class="string-syntax">"&gt;"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">ELEMENTARY_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">found_tdata</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">NOUN_TOKEN</span><span class="plain-syntax">:           </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"noun"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">HELD_TOKEN</span><span class="plain-syntax">:           </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"held"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">MULTI_TOKEN</span><span class="plain-syntax">:          </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"multi"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">MULTIHELD_TOKEN</span><span class="plain-syntax">:      </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"multiheld"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">MULTIEXCEPT_TOKEN</span><span class="plain-syntax">:    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"multiexcept"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">MULTIINSIDE_TOKEN</span><span class="plain-syntax">:    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"multiinside"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">CREATURE_TOKEN</span><span class="plain-syntax">:       </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"creature"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">SPECIAL_TOKEN</span><span class="plain-syntax">:        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"special"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">NUMBER_TOKEN</span><span class="plain-syntax">:         </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"number"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">TOPIC_TOKEN</span><span class="plain-syntax">:          </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"topic"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">          </span><span class="identifier-syntax">ENDIT_TOKEN</span><span class="plain-syntax">:          </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"END"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">PREPOSITION_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"'"</span><span class="plain-syntax">, (</span><span class="identifier-syntax">address</span><span class="plain-syntax">) </span><span class="identifier-syntax">found_tdata</span><span class="plain-syntax">, </span><span class="string-syntax">"'"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">ROUTINE_FILTER_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"noun=Routine("</span><span class="plain-syntax">, </span><span class="identifier-syntax">found_tdata</span><span class="plain-syntax">, </span><span class="string-syntax">")"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">ATTR_FILTER_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">DebugAttribute</span><span class="plain-syntax">) </span><span class="identifier-syntax">found_tdata</span><span class="plain-syntax">;</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">SCOPE_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"scope=Routine("</span><span class="plain-syntax">, </span><span class="identifier-syntax">found_tdata</span><span class="plain-syntax">, </span><span class="string-syntax">")"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">      </span><span class="identifier-syntax">GPR_TT</span><span class="plain-syntax">:</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"Routine("</span><span class="plain-syntax">, </span><span class="identifier-syntax">found_tdata</span><span class="plain-syntax">, </span><span class="string-syntax">")"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP17" class="paragraph-anchor"></a><b>&#167;17. Test Command.</b>TEST runs a short script of commands from the source text.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">#</span><span class="identifier-syntax">ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">DEBUG</span><span class="plain-syntax">;</span>

<span class="plain-syntax">#</span><span class="identifier-syntax">iftrue</span><span class="plain-syntax"> </span><span class="identifier-syntax">WORDSIZE</span><span class="plain-syntax"> == </span><span class="constant-syntax">2</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">TEST_STACK_SIZE</span><span class="plain-syntax"> = </span><span class="constant-syntax">48</span><span class="plain-syntax">;</span>
<span class="plain-syntax">#</span><span class="identifier-syntax">ifnot</span><span class="plain-syntax">;</span>
<span class="reserved-syntax">Constant</span><span class="plain-syntax"> </span><span class="identifier-syntax">TEST_STACK_SIZE</span><span class="plain-syntax"> = </span><span class="constant-syntax">128</span><span class="plain-syntax">;</span>
<span class="plain-syntax">#</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;</span>

<span class="reserved-syntax">Array</span><span class="plain-syntax"> </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax"> --&gt; </span><span class="identifier-syntax">TEST_STACK_SIZE</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Global</span><span class="plain-syntax"> </span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">TestStart</span><span class="plain-syntax"> </span><span class="identifier-syntax">T</span><span class="plain-syntax"> </span><span class="identifier-syntax">R</span><span class="plain-syntax"> </span><span class="identifier-syntax">l</span><span class="plain-syntax"> </span><span class="identifier-syntax">k</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> &gt;= </span><span class="identifier-syntax">TEST_STACK_SIZE</span><span class="plain-syntax">) </span><span class="string-syntax">"&gt;--&gt; Testing too many levels deep"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> = </span><span class="identifier-syntax">T</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax">+1) = </span><span class="constant-syntax">0</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax">+3) = </span><span class="identifier-syntax">l</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> = </span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> + </span><span class="constant-syntax">4</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;0) &amp;&amp; (</span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;0 ~= </span><span class="identifier-syntax">real_location</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">         </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"(first moving to "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;0, </span><span class="string-syntax">")^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">         </span><span class="identifier-syntax">PlayerTo</span><span class="plain-syntax">(</span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;0, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">k</span><span class="plain-syntax">=1;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">k</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">k</span><span class="plain-syntax"> </span><span class="reserved-syntax">notin</span><span class="plain-syntax"> </span><span class="identifier-syntax">player</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"(first acquiring "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">the</span><span class="plain-syntax">) </span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">k</span><span class="plain-syntax">, </span><span class="string-syntax">")^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">move</span><span class="plain-syntax"> </span><span class="identifier-syntax">R</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">k</span><span class="plain-syntax"> </span><span class="reserved-syntax">to</span><span class="plain-syntax"> </span><span class="identifier-syntax">player</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">k</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"(Testing.)^"</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">TestKeyboardPrimitive</span><span class="plain-syntax"> </span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax"> </span><span class="identifier-syntax">a_table</span><span class="plain-syntax"> </span><span class="identifier-syntax">fn</span><span class="plain-syntax"> </span><span class="identifier-syntax">p</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax"> </span><span class="identifier-syntax">j</span><span class="plain-syntax"> </span><span class="identifier-syntax">l</span><span class="plain-syntax"> </span><span class="identifier-syntax">spaced</span><span class="plain-syntax"> </span><span class="identifier-syntax">ch</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;2 = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">KeyboardMorePrimitive</span><span class="plain-syntax">(</span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">a_table</span><span class="plain-syntax">, </span><span class="identifier-syntax">fn</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> {</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">p</span><span class="plain-syntax"> = </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax">-4);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax">-3);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">l</span><span class="plain-syntax"> = </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax">-1);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"["</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;2;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"] "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;2 = </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;2 + </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">style</span><span class="plain-syntax"> </span><span class="identifier-syntax">bold</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">while</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> &lt; </span><span class="identifier-syntax">l</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            #</span><span class="identifier-syntax">iftrue</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CHARSIZE</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">ch</span><span class="plain-syntax"> = </span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            #</span><span class="identifier-syntax">ifnot</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">ch</span><span class="plain-syntax"> = </span><span class="identifier-syntax">p</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            #</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">ch</span><span class="plain-syntax"> == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) </span><span class="reserved-syntax">break</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">spaced</span><span class="plain-syntax"> || (</span><span class="identifier-syntax">ch</span><span class="plain-syntax"> ~= </span><span class="character-syntax">' '</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                #</span><span class="identifier-syntax">iftrue</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CHARSIZE</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="character-syntax">'['</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;(</span><span class="identifier-syntax">i</span><span class="plain-syntax">+1) == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;(</span><span class="identifier-syntax">i</span><span class="plain-syntax">+2) == </span><span class="character-syntax">']'</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">ch</span><span class="plain-syntax"> = </span><span class="character-syntax">'/'</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">i</span><span class="plain-syntax">+2;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax">-&gt;(</span><span class="identifier-syntax">j</span><span class="plain-syntax">+</span><span class="identifier-syntax">WORDSIZE</span><span class="plain-syntax">) = </span><span class="identifier-syntax">ch</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                #</span><span class="identifier-syntax">ifnot</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">p</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="character-syntax">'['</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">p</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">i</span><span class="plain-syntax">+1) == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">p</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">i</span><span class="plain-syntax">+2) == </span><span class="character-syntax">']'</span><span class="plain-syntax">)) {</span>
<span class="plain-syntax">                    </span><span class="identifier-syntax">ch</span><span class="plain-syntax"> = </span><span class="character-syntax">'/'</span><span class="plain-syntax">; </span><span class="identifier-syntax">i</span><span class="plain-syntax"> = </span><span class="identifier-syntax">i</span><span class="plain-syntax">+2;</span>
<span class="plain-syntax">                }</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">j</span><span class="plain-syntax">+1) = </span><span class="identifier-syntax">ch</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                #</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">char</span><span class="plain-syntax">) </span><span class="identifier-syntax">ch</span><span class="plain-syntax">;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">i</span><span class="plain-syntax">++; </span><span class="identifier-syntax">j</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">spaced</span><span class="plain-syntax"> = </span><span class="reserved-syntax">true</span><span class="plain-syntax">;</span>
<span class="plain-syntax">            } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        }</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">style</span><span class="plain-syntax"> </span><span class="identifier-syntax">roman</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">iftrue</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CHARSIZE</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax">-&gt;1 = </span><span class="identifier-syntax">j</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">ifnot</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax">--&gt;0 = </span><span class="identifier-syntax">j</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">VM_Tokenise</span><span class="plain-syntax">(</span><span class="identifier-syntax">a_buffer</span><span class="plain-syntax">, </span><span class="identifier-syntax">a_table</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">iftrue</span><span class="plain-syntax"> (</span><span class="identifier-syntax">CHARSIZE</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">p</span><span class="plain-syntax">-&gt;</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">ifnot</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">p</span><span class="plain-syntax">--&gt;</span><span class="identifier-syntax">i</span><span class="plain-syntax"> == </span><span class="character-syntax">'/'</span><span class="plain-syntax">) </span><span class="identifier-syntax">i</span><span class="plain-syntax">++;</span>
<span class="plain-syntax">        #</span><span class="identifier-syntax">endif</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> &gt;= </span><span class="identifier-syntax">l</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">            </span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> = </span><span class="identifier-syntax">test_sp</span><span class="plain-syntax"> - </span><span class="constant-syntax">4</span><span class="plain-syntax">;</span>
<span class="plain-syntax">        } </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">test_stack</span><span class="plain-syntax">--&gt;(</span><span class="identifier-syntax">test_sp</span><span class="plain-syntax">-3) = </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">#</span><span class="identifier-syntax">ENDIF</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP18" class="paragraph-anchor"></a><b>&#167;18. Trace Command.</b>Another holdover from I6: TRACE sets the level of parser tracing, on a scale
of 0 (off, the default) to 5.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">TraceOnSub</span><span class="plain-syntax">; </span><span class="identifier-syntax">parser_trace</span><span class="plain-syntax">=1; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="string-syntax">"[Trace on.]"</span><span class="plain-syntax">; ];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">TraceLevelSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">parser_trace</span><span class="plain-syntax"> = </span><span class="identifier-syntax">parsed_number</span><span class="plain-syntax">; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"[Parser tracing set to level "</span><span class="plain-syntax">, </span><span class="identifier-syntax">parser_trace</span><span class="plain-syntax">, </span><span class="string-syntax">".]^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">TraceOffSub</span><span class="plain-syntax">; </span><span class="identifier-syntax">parser_trace</span><span class="plain-syntax">=0; </span><span class="identifier-syntax">say__p</span><span class="plain-syntax"> = </span><span class="constant-syntax">1</span><span class="plain-syntax">; </span><span class="string-syntax">"Trace off."</span><span class="plain-syntax">; ];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP19" class="paragraph-anchor"></a><b>&#167;19. Tree Command.</b>SHOWTREE prints out the I6 object tree, though this is not always very helpful
in I7 terms. It should arguably be withdrawn, but doesn't seem to do any harm.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">XTreeSub</span><span class="plain-syntax"> </span><span class="identifier-syntax">i</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">noun</span><span class="plain-syntax"> == </span><span class="constant-syntax">0</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">objectloop</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">i</span><span class="plain-syntax"> </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">Object</span><span class="plain-syntax"> &amp;&amp; </span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="identifier-syntax">XObj</span><span class="plain-syntax">(</span><span class="identifier-syntax">i</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="identifier-syntax">XObj</span><span class="plain-syntax">(</span><span class="identifier-syntax">noun</span><span class="plain-syntax">,1);</span>
<span class="plain-syntax">];</span>

<span class="plain-syntax">[ </span><span class="identifier-syntax">XObj</span><span class="plain-syntax"> </span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="identifier-syntax">f</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">; </span><span class="reserved-syntax">else</span><span class="plain-syntax"> </span><span class="reserved-syntax">print</span><span class="plain-syntax"> (</span><span class="identifier-syntax">a</span><span class="plain-syntax">) </span><span class="identifier-syntax">obj</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">" ("</span><span class="plain-syntax">, </span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="string-syntax">") "</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">f</span><span class="plain-syntax"> == </span><span class="constant-syntax">1</span><span class="plain-syntax"> &amp;&amp; </span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) ~= </span><span class="constant-syntax">0</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"(in "</span><span class="plain-syntax">, (</span><span class="identifier-syntax">name</span><span class="plain-syntax">) </span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">), </span><span class="string-syntax">" "</span><span class="plain-syntax">, </span><span class="reserved-syntax">parent</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">), </span><span class="string-syntax">")"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">new_line</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="reserved-syntax">child</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">) == </span><span class="constant-syntax">0</span><span class="plain-syntax">) </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">if</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> == </span><span class="identifier-syntax">Class</span><span class="plain-syntax">)</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WriteListFrom</span><span class="plain-syntax">(</span><span class="reserved-syntax">child</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">), </span><span class="identifier-syntax">NEWLINE_BIT</span><span class="plain-syntax">+</span><span class="identifier-syntax">INDENT_BIT</span><span class="plain-syntax">+</span><span class="identifier-syntax">ALWAYS_BIT</span><span class="plain-syntax">+</span><span class="identifier-syntax">NOARTICLE_BIT</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">else</span>
<span class="plain-syntax">        </span><span class="identifier-syntax">WriteListFrom</span><span class="plain-syntax">(</span><span class="reserved-syntax">child</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">), </span><span class="identifier-syntax">NEWLINE_BIT</span><span class="plain-syntax">+</span><span class="identifier-syntax">INDENT_BIT</span><span class="plain-syntax">+</span><span class="identifier-syntax">ALWAYS_BIT</span><span class="plain-syntax">+</span><span class="identifier-syntax">FULLINV_BIT</span><span class="plain-syntax">, </span><span class="constant-syntax">1</span><span class="plain-syntax">);</span>
<span class="plain-syntax">];</span>
</pre>
<p class="commentary firstcommentary"><a id="SP20" class="paragraph-anchor"></a><b>&#167;20. GlkList Command.</b>GLKLIST is a testing command best used by those who understand Glulx and its
ways: it isn't documented in the I7 manual, because it is pretty inscrutable
for "real" users, but it's probably worth keeping just the same.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">#</span><span class="identifier-syntax">Ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">TARGET_GLULX</span><span class="plain-syntax">;</span>
<span class="plain-syntax">[ </span><span class="identifier-syntax">GlkListSub</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="identifier-syntax">GlkDebuggingList</span><span class="plain-syntax">();</span>
<span class="plain-syntax">];</span>
<span class="plain-syntax">#</span><span class="identifier-syntax">Endif</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP21" class="paragraph-anchor"></a><b>&#167;21. Grammar.</b>In the old I6 parser, testing commands had their own scope hardwired in to the
code: this worked by comparing the verb command word directly against <span class="extract"><span class="extract-syntax">'scope'</span></span>
and the like. That would go wrong if the testing commands were translated into
other languages, and was a crude design at best. The following scope token is
better: using this token instead of <span class="extract"><span class="extract-syntax">multi</span></span> provides a noun with universal
scope (but restricted to I7 objects, so I6 pseudo-objects like <span class="extract"><span class="extract-syntax">compass</span></span> are
not picked up) and able to accept multiple objects.
</p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">[ </span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax"> </span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="identifier-syntax">o2</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    </span><span class="reserved-syntax">switch</span><span class="plain-syntax"> (</span><span class="identifier-syntax">scope_stage</span><span class="plain-syntax">) {</span>
<span class="plain-syntax">        </span><span class="constant-syntax">1</span><span class="plain-syntax">: </span><span class="reserved-syntax">rtrue</span><span class="plain-syntax">; </span><span class="comment-syntax">allow multiple objects</span>
<span class="plain-syntax">        </span><span class="constant-syntax">2</span><span class="plain-syntax">: </span><span class="reserved-syntax">objectloop</span><span class="plain-syntax"> (</span><span class="identifier-syntax">obj</span><span class="plain-syntax">)</span>
<span class="plain-syntax">            </span><span class="reserved-syntax">if</span><span class="plain-syntax"> ((</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">ofclass</span><span class="plain-syntax"> </span><span class="identifier-syntax">Object</span><span class="plain-syntax">) &amp;&amp; (</span><span class="identifier-syntax">obj</span><span class="plain-syntax"> </span><span class="reserved-syntax">provides</span><span class="plain-syntax"> </span><span class="identifier-syntax">KD_Count</span><span class="plain-syntax">))</span>
<span class="plain-syntax">                </span><span class="identifier-syntax">PlaceInScope</span><span class="plain-syntax">(</span><span class="identifier-syntax">obj</span><span class="plain-syntax">, </span><span class="reserved-syntax">true</span><span class="plain-syntax">);</span>
<span class="plain-syntax">        </span><span class="constant-syntax">3</span><span class="plain-syntax">: </span><span class="reserved-syntax">print</span><span class="plain-syntax"> </span><span class="string-syntax">"There seems to be no such object anywhere in the model world.^"</span><span class="plain-syntax">;</span>
<span class="plain-syntax">    }</span>
<span class="plain-syntax">];</span>

<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'abstract'</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax"> </span><span class="character-syntax">'to'</span><span class="plain-syntax"> </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax"> -&gt; </span><span class="identifier-syntax">XAbstract</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'banish'</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax">                     -&gt; </span><span class="identifier-syntax">XBanish</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'actions'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">ActionsOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'on'</span><span class="plain-syntax">                                      -&gt; </span><span class="identifier-syntax">ActionsOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'off'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">ActionsOff</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'gonear'</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax">                     -&gt; </span><span class="identifier-syntax">Gonear</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'purloin'</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax">                     -&gt; </span><span class="identifier-syntax">XPurloin</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'random'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">Predictable</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'relations'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">ShowRelations</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'responses'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">ShowResponses</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">special</span><span class="plain-syntax">                                   -&gt; </span><span class="identifier-syntax">ShowResponses</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'now'</span><span class="plain-syntax"> </span><span class="identifier-syntax">special</span><span class="plain-syntax">                             -&gt; </span><span class="identifier-syntax">ShowResponses</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'set'</span><span class="plain-syntax"> </span><span class="identifier-syntax">special</span><span class="plain-syntax">                             -&gt; </span><span class="identifier-syntax">ShowResponses</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'rules'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">RulesOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'all'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">RulesAll</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'on'</span><span class="plain-syntax">                                      -&gt; </span><span class="identifier-syntax">RulesOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'off'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">RulesOff</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'dialogue'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">DialogueOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'all'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">DialogueAll</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'on'</span><span class="plain-syntax">                                      -&gt; </span><span class="identifier-syntax">DialogueOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'off'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">DialogueOff</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'scenes'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">ScenesOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'on'</span><span class="plain-syntax">                                      -&gt; </span><span class="identifier-syntax">ScenesOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'off'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">ScenesOff</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'scope'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">Scope</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax">                     -&gt; </span><span class="identifier-syntax">Scope</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'showheap'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">ShowHeap</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'showme'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">ShowMe</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax">                     -&gt; </span><span class="identifier-syntax">ShowMe</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'showverb'</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">special</span><span class="plain-syntax">                                   -&gt; </span><span class="identifier-syntax">ShowVerb</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'test'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">TestScript</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">special</span><span class="plain-syntax">                                   -&gt; </span><span class="identifier-syntax">TestScript</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'trace'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">TraceOn</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">number</span><span class="plain-syntax">                                    -&gt; </span><span class="identifier-syntax">TraceLevel</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'on'</span><span class="plain-syntax">                                      -&gt; </span><span class="identifier-syntax">TraceOn</span>
<span class="plain-syntax">    * </span><span class="character-syntax">'off'</span><span class="plain-syntax">                                     -&gt; </span><span class="identifier-syntax">TraceOff</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'showtree'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">XTree</span>
<span class="plain-syntax">    * </span><span class="identifier-syntax">scope</span><span class="plain-syntax">=</span><span class="identifier-syntax">testcommandnoun</span><span class="plain-syntax">                     -&gt; </span><span class="identifier-syntax">XTree</span><span class="plain-syntax">;</span>
<span class="plain-syntax">#</span><span class="identifier-syntax">Ifdef</span><span class="plain-syntax"> </span><span class="identifier-syntax">TARGET_GLULX</span><span class="plain-syntax">;</span>
<span class="identifier-syntax">Verb</span><span class="plain-syntax"> </span><span class="identifier-syntax">meta</span><span class="plain-syntax"> </span><span class="character-syntax">'glklist'</span>
<span class="plain-syntax">    *                                           -&gt; </span><span class="identifier-syntax">GlkList</span><span class="plain-syntax">;</span>
<span class="plain-syntax">#</span><span class="identifier-syntax">Endif</span><span class="plain-syntax">;</span>
</pre>
<p class="commentary firstcommentary"><a id="SP22" class="paragraph-anchor"></a><b>&#167;22. End testy.</b></p>

<pre class="displayed-code all-displayed-code code-font">
<span class="plain-syntax">#</span><span class="identifier-syntax">Endif</span><span class="plain-syntax">;</span>
</pre>
<nav role="progress"><div class="progresscontainer">
    <ul class="progressbar"><li class="progressprev"><a href="tm.html">&#10094;</a></li><li class="progresssection"><a href="mscll.html">mscll</a></li><li class="progresssection"><a href="stt.html">stt</a></li><li class="progresssection"><a href="lght.html">lght</a></li><li class="progresssection"><a href="lstwr.html">lstwr</a></li><li class="progresssection"><a href="ordrf.html">ordrf</a></li><li class="progresssection"><a href="actns.html">actns</a></li><li class="progresssection"><a href="fgrs.html">fgrs</a></li><li class="progresssection"><a href="otfwr.html">otfwr</a></li><li class="progresssection"><a href="prntn.html">prntn</a></li><li class="progresssection"><a href="wrldm.html">wrldm</a></li><li class="progresssection"><a href="mprtf.html">mprtf</a></li><li class="progresssection"><a href="tm.html">tm</a></li><li class="progresscurrent">tsts</li><li class="progresssection"><a href="chrnl.html">chrnl</a></li><li class="progresssection"><a href="strdc.html">strdc</a></li><li class="progressnext"><a href="chrnl.html">&#10095;</a></li></ul></div>
</nav><!-- End of weave -->

		</main>
	</body>
</html>

